<template>
  <div @click="father">
      <button @click.stop='son'>阻止事件冒泡</button>
      <a @click.prevent.stop href="https://www.bilibili.com/">去b</a>
      <!--   只执行一次 -->
      <button @click.stop @click.once="fn" >只执行一次   </button>
  </div>
</template>

<script>
export default {
 methods: {
     father(){
         console.log('父亲触发了');
     },
     son(){
         console.log('儿子触发了');
     },
     fn(){
         console.log('只执行一次');
     }

 }
}
</script>

<style>

</style>